﻿<Window x:Class="ExeInvoker.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="程序执行工具" Height="350" Width="525" Loaded="Window_Loaded" KeyDown="Window_KeyDown">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" MinHeight="100"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*" MinHeight="100"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <DataGrid Grid.Row="0" Name="dgvPrograms" IsReadOnly="True" AutoGenerateColumns="False" Margin="3" SelectionMode="Extended" SelectionUnit="CellOrRowHeader" RowHeaderWidth="25">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="快捷键" Width="Auto" Binding="{Binding Path=StrokeKeys}"/>
                    <DataGridTextColumn Header="程序路径" Width="Auto" Binding="{Binding Path=ProgramPath}"/>
                    <DataGridTextColumn Header="程序参数" Width="*" Binding="{Binding Path=ProgramArgs}"/>
                </DataGrid.Columns>
            </DataGrid>

            <StackPanel Grid.Row="1" Margin="3" Orientation="Horizontal" HorizontalAlignment="Right">
                <Button Name="btnClearMessage" Content="清空消息" Margin="3" Width="60" Click="btnClearMessage_Click"/>
                <Button Name="btnAdd" Content="添加" Margin="3" Width="60" Click="btnAdd_Click"/>
                <Button Name="btnDel" Content="删除" Margin="3" Width="60" Click="btnDel_Click"/>
                <Button Name="btnEdit" Content="编辑" Margin="3" Width="60" Click="btnEdit_Click"/>
                <Button Name="btnExe" Content="执行" Margin="3" Width="60" Click="btnExe_Click"/>
            </StackPanel>

        </Grid>

        <GridSplitter Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="5" Background="AliceBlue"/>

        <TextBox Grid.Row="2" Name="tbOutput" Margin="3" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
    </Grid>
</Window>
